home *** CD-ROM | disk | FTP | other *** search
/ CD ROM Paradise Collection 4 / CD ROM Paradise Collection 4 1995 Nov.iso / program / swags_z.zip / SOUND.SWG / 0048_Max Volume on SB.pas < prev    next >
Pascal/Delphi Source File  |  1994-08-24  |  1KB  |  34 lines

  1. {
  2.  KP> HOW CAN I CHANGE THE OVERALL VOLUME OF SOUND BLASTER ? It must be a
  3.  KP> single OUT , or something . . .
  4.  
  5. Actually I did a small program yesterday that maximizes the master, VOC and FM
  6. volumes... Here it is:
  7.  
  8. [------------------------------ C u t -----------------------]
  9. }
  10.  
  11. program MaxVol;
  12.  
  13.   begin
  14.     Port[$224] := 4;     { register 04h - VOC volume }
  15.     Port[$225] := $FF;
  16.     Port[$224] := $22;   { register 22h - *** Master volume *** }
  17.     Port[$225] := $FF;
  18.     Port[$224] := $26;   { register 26h - FM volume }
  19.     Port[$225] := $FF;
  20.   end.
  21.  
  22. {
  23.  
  24. This works fine on the SB16 I'm using, and it should work as well with all the
  25. other SB models.
  26. The left volume is in one of the nibbles, and the right in the other (I can't
  27. remember which one is in which nibble though...;).
  28. The max volume for L/R is 15/15, and since 15 shl 4 or 15 = 255 (0FFh) that's
  29. the value I use. I haven't tried but I guess that you can use the 225h port to
  30. read the register contents as well as write it.
  31.  
  32.  // Christian Kullander
  33. }
  34.